add cleanup code when changing owners