Fix session id generation.
Merge remote-tracking branch 'origin/deif-fix-session-id'