some fixes in Session.hs