fixed plugin loading/unloading.