fix incorrect sort for ticket