Fix session id generation.