Fixing bug for unsaved deletes