FIxing a bug that deleted the text on unselect