Fix modelling and prediction bug.