Fix crash bug in calling addticket