fixed broken log session handling