Fixed bugs in parser.y file