Fixed a bug that was preventing session files from being saved.