BUG: moved up the pluginInit function