Move this on top of the dispatchEvent