fixes for saving session objects