Fixing event ordering