fix module deactivation