Fix duplicate entries for users after checking for UUID in database