Fix segmentation fault when clicking html texts.