fixed session error in tests