Fix various serialization bugs with new Jackson-based serialization.