Check if active before unloading the module