Spelling error in setting name & label name

also reordered code (no changes made to the actual code though,
behaviour is the same)