Fix a bug on state of current_elf.