fix session error problem