bug fixes for loading session file