fix some bug for tb_strncpy