Fixing bad session id bug