fix mongo query parser