Fix for move to folder

Close #765.