Be a little safer about dispatchEvent