fixed DEF FN and ATN bugs