fixed bug in plugins_api