bug in removing all characters in selection