fix query parse