I've also fixed that in the dispatchEvent method