fix potential bug with downloading multiple chunks