fix chunking on the encryption side