Session was constantly being pickled without converting to dict as it should be.
Added settings.hostname before locking settings, the class may need a comment explaining when is settings.hostname needed