Modified serialization a bit.