fixed error with sessions