fix encoding pb