Fixed bugs in move of scaleToFit to fdjtDOM