fixed bug on chunked download