Various fixes to plugin/CC stuff