fix bug in parser atn simulator