Bug fix when creating new session IDs