scale factor bug fix