fix deletedirectory