fix remaining bugs for parser