Remove protocl buffer dependency by merging Sen's fix