 			dispatch_io_set_low_water(channel, 1)
 			dispatch_io_read(channel, 0, Int.max, self.queue) { (done, data, error) in
 				if let data = data {
-					observer.sendNext(data)
+					observer.sendNext(data as! NSData)
 				}
 
 				if error == ECANCELED {

	///
	/// After starting the returned producer, `readFD` should not be used
	/// anywhere else, as it may close unexpectedly.
	func transferReadsToProducer() -> SignalProducer<dispatch_data_t, TaskError> {
		return SignalProducer { observer, disposable in
			dispatch_group_enter(self.group)
			let channel = dispatch_io_create(DISPATCH_IO_STREAM, self.readFD, self.queue) { error in

	let readProducer = pipe.transferReadsToProducer()

	return SignalProducer { observer, disposable in
		var buffer: NSData? = nil

		readProducer.startWithSignal { signal, signalDisposable in
			disposable.addDisposable(signalDisposable)

			signal.observe(Observer(next: { data in
				observer.sendNext(.Chunk(data))

				if let existingBuffer = buffer {
					buffer = existingBuffer + data
				} else {
					buffer = data
				}
			}, failed: observer.sendFailed
			, completed: {
				observer.sendNext(.Aggregated(buffer ?? NSData()))
				observer.sendCompleted()
			}, interrupted: observer.sendInterrupted
			))
