Fixed an issue with incorrect chunk size being added to the buffer.