Make sure events are consistently ordered