It's hard to figure out what's wrong with just a snippet of the code. We don't know what type TicketHandler is for instance.