Bug fixed in create_caret_folds function