Fixed bug occuring when disabling the plugin