Fixed event time comparison bug