Fix session bug