fixes bug with session context