fixes in plugin system