unregister hooks when shutting down module