Fix session id bug