Bug 948852 - Fix the event creation error

https://bugzilla.mozilla.org/show_bug.cgi?id=948852