Fixed bugs in parse