Issue #31: Make sure the stream read buffer is emptied.