Some fixes to widget events