Solved min==max issue in scaleRange()