fixed a crash when installing the plugin for the first time