Minor changes to plugin lib