Correct bugs in parser