fix double deletion of selection