Set ec to null when the plugin stops.