Fixed some errors in the parser