Fixed bug in init_plugins