Fix bug in setScaleFactors.