Fixed bug detected by test_cross_validation.py:test_train_cv