Fixed a crash in IE occuring as soon as the script was loaded, due do the
way custom events are created