fix bug with closed folds when opening a file