fix error scaling