Minor change to make the delete text work properly regardless of selection order.