Fixed how legs are serialized.