Rewrote fireEvent with CustomEvent, createEvent is deprecated