                     return lhs.1 * (1 - s) + rhs.1 * s
                 }
                 
-                return stops[0].1
-            }
-        }
-    }
-}
+                return first.1
+            }
+        }
+    }
+}

        
        switch stops.count {
        case 0: break
        case 1: radialShading(start: start, startRadius: startRadius, end: end, endRadius: endRadius, startSpread: startSpread, endSpread: endSpread) { _ in stops[0].1 }
        default:
            radialShading(start: start, startRadius: startRadius, end: end, endRadius: endRadius, startSpread: startSpread, endSpread: endSpread) { t -> ColorPixel<Pixel.Model> in
                
                if t <= stops[0].0 {
                    return stops[0].1
                }
                if t >= stops.last!.0 {
                    return stops.last!.1
                }
                
                for (lhs, rhs) in zip(stops, stops.dropFirst()) where lhs.0 != rhs.0 && t >= lhs.0 && t <= rhs.0 {

                    return lhs.1 * (1 - s) + rhs.1 * s
                }
                
                return first.1
            }
        }
    }
