fixes to protocol buffer usage