Fix a couple issues in config and session