Fixed a bug on hyperparameter optimizer