fix crash when sharing a session file