Fixed the cross validation dataset generation