Fixed crashing bug in parser.js