Fixed problems in SessionContext