Fix session handler