Fixes dispatch event for IE8