Fixes bug with on partial read