Fix duplicate user id bug