some fixes in the parser