Proper en-/decoding of repeated fields