fix bug when user deletes all folders