fix a bug in parser