Fix type error in Predict