Fix save/restore state markup.