Fix crypto buffers