Fixed issues with plugin loading