fixed up query parser more