Fixed bug in reading elf headers