Move check if ticket exists in ticket array before processing.