Make protocol buffer serialization work