improve plugins loading/unloading