Fix for pluginsLoaded being called multiple times on init

Added pluginsLoaded flag to check if loadPlugins has already been run