Fixed scaleFactor method not returning if data is invalid