bugfix in fold generation for learning curves