Fix crash in elf parser