Remove invalid mongo query