fix help

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
diff --git a/cli/cli.go b/cli/cli.go
index fdadf11..25cf03d 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -111,15 +111,12 @@
 	// OR
 	// args is less than zero
 	// OR
-	// args contains a help flag
-	// OR
-	// we have more than one arg and it equals help
+	// we have more than one arg and it equals help OR is a help flag
 	// THEN
 	// printUsage
 	if args == nil ||
 		len(args) < 1 ||
-		contains([]string{"-h", "--help"}, args) ||
-		(len(args) > 1 && args[1] == "help") {
+		(len(args) > 1 && contains([]string{"-h", "--help", "help"}, args[1])) {
 		return true, nil
 	}
 
@@ -374,14 +371,11 @@
 	return false
 }
 
-func contains(match, a []string) bool {
-	// Iterate over the items in the slice.
-	for _, s := range a {
-		// Iterate over the items to match.
-		for _, m := range match {
-			if s == m {
-				return true
-			}
+func contains(match []string, s string) bool {
+	// Iterate over the items to match.
+	for _, m := range match {
+		if s == m {
+			return true
 		}
 	}
 	return false
diff --git a/cli/cli_test.go b/cli/cli_test.go
index 40bb825..e101b62 100644
--- a/cli/cli_test.go
+++ b/cli/cli_test.go
@@ -179,12 +179,12 @@
 			args:        []string{"foo", "error", "foo", "bar", "--help"},
 		},
 		{
-			description: "args: foo version foo --help",
-			args:        []string{"foo", "version", "foo", "--help"},
+			description: "args: foo version --help",
+			args:        []string{"foo", "version", "--help"},
 		},
 		{
-			description: "args: foo version foo bar -h",
-			args:        []string{"foo", "version", "foo", "bar", "-h"},
+			description: "args: foo version -h",
+			args:        []string{"foo", "version", "-h"},
 		},
 	}
 }
@@ -314,6 +314,7 @@
 
 func TestProgramHelpFlag(t *testing.T) {
 	p := NewProgram()
+	p.FlagSet = flag.NewFlagSet("global", flag.ContinueOnError)
 	testCases := testCasesHelp()
 
 	for _, tc := range testCases {