Fixed the initilization of plugins.