fix removeRange upgrade issue