fixed the ticket api. Events were not getting registered