fixed tb_visit javascript crash issue