fix exceptions in ProtocolBufferReader