fixed session handling