Minor fixes for issues discovered when compiling with proto-compiler.