Fix event ordering