bugfix when dir has been deleted