fix parser's bugs