Fixing elf update bug