Fix a bug when estimator is not fitted