Correctly handle errors in user streams.  Improve error handling.  Fix #177.