Fixed a bug in observer/stream reading.

The observer/stream read query had a bug since its refactoring. It has been fixed.