//fixed bug when changing range type