bug fix for events in Firefox