wip - more fixes for plugin api