Fixed incomplete bug fix for threshold scaling.