bugs with sessions - fixed