refined deserialization of proto messages