Fixed issue with sessions