Fix session checking.