Fixed #1217 (scaleFactor, debug shapes).