         if (orientation == StageOrientation.ROTATED_LEFT ||
             orientation == StageOrientation.ROTATED_RIGHT)
         {
-            stageWidth = stage.stageHeight / dpiScaling;
-            stageHeight = stage.stageWidth / dpiScaling;
+            stageWidth = stage.stageHeight / dpiScale;
+            stageHeight = stage.stageWidth / dpiScale;
         }
         else
         {
-            stageWidth = stage.stageWidth / dpiScaling;
-            stageHeight = stage.stageHeight / dpiScaling;
+            stageWidth = stage.stageWidth / dpiScale;
+            stageHeight = stage.stageHeight / dpiScale;
         }
 
         // The image dimensions

            m.rotate(rotation);

        // Align center of image (0,0) to center of stage: 
        var stageWidthAfterOrientationAndDPI:Number = stage.stageWidth / dpiScaling;
        var stageHeightAfterOrientationAndDPI:Number = stage.stageHeight / dpiScaling;
        m.translate(stageWidthAfterOrientationAndDPI / 2, stageHeightAfterOrientationAndDPI / 2);

        // Apply matrix

        var orientation:String = stage.deviceOrientation;

        // DPI scaling factor of the stage
        var dpiScale:Number = 1;
        if (parent.parent is SystemManager)
            dpiScale = SystemManager(parent.parent).densityScale;

        // Get stage dimensions at default orientation
        var stageWidth:Number;
