fix deactivate