cleanups to help the deleting work