FIXED two issues with unloading a plugin