fixed parser bugs