Fixed error with scale factors being set to 0