try to unregister listeners even when unloading.