Really fix ticket ordering logic