Store plugin in a local variable to fix error on disable