Bug fixed in freeSession.