bug fixes, now we can switch on the plug with the associated event