Prevent that internal stream Read uses negative count. Issue #312