         }
 
         recurInputProducer(SignalProducer(inputSignal), strategy: strategy)
-            .withLatest(from: stateProperty.producer)
-            .flatMap(.merge) { input, fromState -> SignalProducer<Reply<State, Input>, NoError> in
+            .flatMap(.merge) { fromState, input -> SignalProducer<Reply<State, Input>, NoError> in
                 if let (toState, _) = mapping(fromState, input) {
                     return .init(value: .success(input, fromState, toState))
                 }

                            .filterMap { input, fromState, effect in
                                return effect.map { (input, fromState, $0) }
                            }
                            .flatMap(strategy) { input, _, effect -> SignalProducer<Input, NoError> in
                                return recurInputProducer(effect, strategy: strategy)
                                    .prefix(value: input)
                            }

                        let failureSignal = mappingSignal
                            .filterMap { input, _, effect -> Input? in
                                return effect == nil ? input : nil
                            }

                        let mergedProducer = SignalProducer(values: failureSignal, successSignal).flatten(.merge)


        /// Recursive input-producer that sends inputs from `inputSignal`
        /// and also from additional effect generated by `EffectMapping`.
        func recurInputProducer(_ inputProducer: SignalProducer<Input, NoError>, strategy: FlattenStrategy) -> SignalProducer<(State, Input), NoError>
        {
            return SignalProducer<(State, Input), NoError> { observer, disposable in
                inputProducer
                    .withLatest(from: stateProperty.producer)
                    .map { input, fromState in
