Fixed crash on CreateEvent on iOS