Bug fix createEvent