       return self))
 
   _optError: (parent, child) =>
-    if @["_#{parent}"][child] is undefined
+    console.log parent
+    if parent[child.arg] is undefined
       if child.length < 2
-        console.error("#{@app}: invalid option -- '#{child}'")
-        process.exit(1)
-      else if child.length > 1
-        console.error("#{@app}: unrecognized option '--#{child}'")
+        console.error("#{@app}: invalid option -- '#{child.arg}'")
+        process.exit(1)
+      else
+        console.error("#{@app}: unrecognized option '--#{child.arg}'")
         process.exit(1)
 
   _parentError: () =>

      if /^--$/.test(arg)
        optend = true
      else if /^-$/.test(arg)
        noopt = true
      else
        if noopt
          null # do nothing

        ++elem.index)
    return list

# XXX transforms `-hxv' into `-h -x -v'
  _splitCombinedShorts: () =>
    @_opts.forEach((elem, ind) =>
      dashes = elem.arg.replace(/^(--?).*/, '$1').length # number of dashes
