Prepare to serialize before doing so