Fixed new CustomEvent causing build problems