Removed replace bug when text is selected