fix bugs in new parser base