Fixed a serious bug in scaling values inserted into the SDF