Fixed buy-ticket-f function.