tweaks to widget code to fix double firing event bug