fix deactivate hook