Fix getScaleFactor