Added a way to not crash when a plugin unloads.