 		scale = 1
 		scale = @scale * @scaleX if self
 		for parent in @ancestors(context=true)
-			scale = scale * parent.scale * parent.scaleX
+			if parent.scale?
+				scale *= parent.scale
+			if parent.scaleX?
+				scale *= parent.scaleX
 		return scale
 
 	canvasScaleY: (self=true) ->
 		scale = 1
 		scale = @scale * @scaleY if self
 		for parent in @ancestors(context=true)
-			scale = scale * parent.scale * parent.scaleY
+			if parent.scale?
+				scale *= parent.scale
+			if parent.scaleY?
+				scale *= parent.scaleY
 		return scale
 
 	screenScaleX: (self=true) ->
 		scale = 1
 		scale = @scale * @scaleX if self
 		for parent in @ancestors(context=false)
-			scale = scale * parent.scale * parent.scaleX
+			if parent.scale?
+				scale *= parent.scale
+			if parent.scaleX?
+				scale *= parent.scaleX
 		return scale
 
 	screenScaleY: (self=true) ->
 		scale = 1
 		scale = @scale * @scaleY if self
 		for parent in @ancestors(context=false)
-			scale = scale * parent.scale * parent.scaleY
+			if parent.scale?
+				scale *= parent.scale
+			if parent.scaleY?
+				scale *= parent.scaleY
 		return scale
 
 

		importable: true
		exportable: false
		get: ->
			return Utils.convertFrameToContext(@frame, @, true, false)
		set: (frame) ->
			@frame = Utils.convertFrameFromContext(frame, @, true, false)


		layers.reverse()

		for parent in layers
			p = parentOrContext(parent)
			factorX = p?.screenScaleX?() ? 1
			factorY = p?.screenScaleY?() ? 1
			layerScaledFrame = parent.scaledFrame?() ? {x: 0, y: 0}
			frame.x += layerScaledFrame.x * factorX
			frame.y += layerScaledFrame.y * factorY

