fixed buffer serialization