small fixes with sessions