Update session.py to resolve issue #60

It's possible something is wrong before we get to this point. This at least makes it safe for now.