Attempt to fix serialisation errors after hybernation.