Fixes to plugin