fix chunked encoding