Updated event fixing to support IE8 and Firefox