 	public func filter(predicate: Value -> Bool) -> Signal<Value, Error> {
 		return Signal { observer in
 			return self.observe { (event: Event<Value, Error>) -> Void in
-				if case let .Next(value) = event {
-					if predicate(value) {
-						observer.sendNext(value)
-					}
-				} else {
+				guard let value = event.value else {
 					observer.action(event)
+					return
+				}
+
+				if predicate(value) {
+					observer.sendNext(value)
 				}
 			}
 		}

			var taken = 0

			return self.observe { event in
				if case let .Next(value) = event {
					if taken < count {
						taken += 1
						observer.sendNext(value)
					}

					if taken == count {
						observer.sendCompleted()
					}

				} else {
					observer.action(event)
				}
			}
		}

	public func takeWhile(predicate: Value -> Bool) -> Signal<Value, Error> {
		return Signal { observer in
			return self.observe { event in
				if let value = event.value where !predicate(value) {
					observer.sendCompleted()
				} else {
					observer.action(event)
