Fix setRange method and getRange method.