 /// map using newValue only & bind to transformed Stream
 public func flatMap<T, U>(transform: T -> Stream<U>)(upstream: Stream<T>) -> Stream<U>
 {
-    var autoCanceller: AutoCanceller? = nil
-    
     return Stream<U> { progress, fulfill, reject, configure in
         
-        _bindToUpstream(upstream, fulfill, reject, configure)
+        var canceller: Canceller? = nil
+        _bindToUpstream(upstream, fulfill, reject, configure, canceller)
         
         // NOTE: each of `transformToStream()` needs to be retained outside
         var innerStreams: [Stream<U>] = []
         
-        upstream.react(&autoCanceller) { value in
+        upstream.react(&canceller) { value in
             let innerStream = transform(value)
             innerStreams += [innerStream]
             

/// filter using newValue only
public func filter<T>(filterClosure: T -> Bool)(upstream: Stream<T>) -> Stream<T>
{
    var autoCanceller: AutoCanceller? = nil
    
    return Stream<T> { progress, fulfill, reject, configure in
        
        _bindToUpstream(upstream, fulfill, reject, configure)
        
        upstream.react(&autoCanceller) { value in
            if filterClosure(value) {
                progress(value)
            }


public func take<T>(maxCount: Int)(upstream: Stream<T>) -> Stream<T>
{
    return Stream<T> { progress, fulfill, reject, configure in
        
        var canceller: Canceller? = nil
        _bindToUpstream(upstream, nil, reject, configure, canceller)
        
        var count = 0
        
        upstream.react(&canceller) { value in
            count++
            
            if count < maxCount {
