Fix bug with delete selection