Fixed a bug when people delete the text contents