fix the session storage by serializing the objects first