Fix for sub-command picking up the wrong name

There's probably something else wrong here as cmd.name always seems to be 'Command', but this will work for now! :)