Fixed query error in event update