Add deactivation handler.