fixed endf bugs