fix bug that wouldnt restore deleted folders on undo