bug fix, add deactivate