fix bug on chunked data