Fix module unloading.