fixed a bug in cross validation fold creation