Fixed the annoying error when saving the session.