Fix bug where a text entry could be selected after an entry removed