fix order logic, still relies on receiving the events in order