stop item deletion from crashing window