Fix unloading issues