Fixed deactivation hook