Fixing bug in parser