Added check for local name and uid when adding