fix bizarre session id bug, from #15393