Made serialisation work.