clean up the cleanup routine