Fix wrong alignment of data in buffers