fix some bugs in proto