Fixed bugs for the parser