You need to fix this by specifying a pump curve for which the head is monotonically decreasing with the flow rate. See the documentation of the model or Modelica library that you are using.