In hydrological modelling, a good result for the criterion of goodness of fit does not always imply that the hypothesis of mass conservation is fulfilled, and models can lose their essential physical soundness. We propose a way for detecting this anomaly by accounting the resulting water balance during model simulation and use it to modulate the obtained goodness of fit. We call this anomaly in water balance as "inner balance error of the model". To modulate the goodness of fit values, a penalty function that depends on this error is proposed. In addition, this penalty function is introduced into a multi-criteria objective function, which is also tested. This procedure was followed in modelling the Headwater of the Tagus River (Spain), applying the monthly abcd water balance model. Modulation of the goodness of fit allowed for detecting balance errors in the modelling, revealing that in the simulation of some catchments the model tends to accumulate water in, or release water from, the reservoir that simulates groundwater storage. Although the proposed multi-criteria objective function solves the inner balance error for most catchments, in some cases the error cannot be corrected, indicating that any error in the input and output data is probably related to groundwater flows.