Second attempt to fix session error