Small fix for Event construction

Fixes Firefox's issues