Fix bug when delete text