Fix bug: takeBytes 0 should not pull from upstream.