             if initialValue == nil {
 
                 initialValue = node.valueForKeyPath(keyPath) as! CGFloat
-                initialDistance = initialDistance ?? finalValue - initialValue
-                finalValue = finalValue ?? initialValue + initialDistance
+                initialDistance = initialDistance ?? finalValue - initialValue!
+                finalValue = finalValue ?? initialValue! + initialDistance
 
                 var magicNumber: CGFloat! // picked manually to visually match the behavior of UIKit
                 if dampingRatio < 1 { magicNumber = 8 / dampingRatio }

                dampedFrequency = naturalFrequency * sqrt(1 - pow(dampingRatio, 2))
                t1 = 1 / (naturalFrequency * (dampingRatio - sqrt(pow(dampingRatio, 2) - 1)))
                t2 = 1 / (naturalFrequency * (dampingRatio + sqrt(pow(dampingRatio, 2) - 1)))
            }

            var currentValue: CGFloat!

    private class func animateKeyPath(keyPath: String, byValue: CGFloat!, toValue: CGFloat!, duration: NSTimeInterval, delay: NSTimeInterval, usingSpringWithDamping dampingRatio: CGFloat, initialSpringVelocity velocity: CGFloat) -> SKAction {
        
        var initialValue: CGFloat!
        var naturalFrequency: CGFloat = 0
        var dampedFrequency: CGFloat = 0
        var t1: CGFloat = 0
        var t2: CGFloat = 0
        var A: CGFloat = 0
        var B: CGFloat = 0
        var finalValue = toValue
        var initialDistance = byValue
        
