Fix the session bug