fix bug causing ticketID to not generate properly