Nested while loop fixed in parser.