Fix session check

And now for good, I hope