 /// _values_ into a signal of those events themselves.
 public func dematerialize<T, E>(signal: Signal<Event<T, E>, NoError>) -> Signal<T, E> {
 	return Signal { observer in
-		return signal.observe(next: { event in
-			observer.put(event)
-		}, completed: {
-			sendCompleted(observer)
+		return signal.observe(SinkOf { event in
+			switch event {
+			case let .Next(innerEvent):
+				observer.put(innerEvent.unbox)
+
+			default:
+				observer.put(event)
+			}
 		})
 	}
 }

///
/// Returns a signal that will send values from `signal`, sampled (possibly
/// multiple times) by `sampler`, then complete once both input signals have
/// completed.
public func sampleOn<T, E>(sampler: Signal<(), NoError>)(signal: Signal<T, E>) -> Signal<T, E> {
	return Signal { observer in
		let state = Atomic(SampleState<T>())

			if oldState.signalCompleted {
				sendCompleted(observer)
			}
		}, cancelled: {
			sendCancelled(observer)
		})

		return CompositeDisposable([ signalDisposable, samplerDisposable ])
