fixes a bug when disabling multiple plugins.