fixes for deleting files