diff --git a/lib/util/wrap.js b/lib/util/wrap.js
index <HASH>..<HASH> 100644
--- a/lib/util/wrap.js
+++ b/lib/util/wrap.js
@@ -23,16 +23,16 @@ exports.wrapExport = function (wrapFunction, required, optional) {
         var collectOptions = true;
         if (length === 1 && (first instanceof Object)) {
           assume = true;
-          var requiredArg = required[0];
-          if (requiredArg && requiredArg instanceof Object) {
-            for (var i = 0; i < requiredArg.length; i++) {
-              if (first[requiredArg[i]]) {
+          var firstArg = required[0] || optional;
+          if (firstArg && firstArg instanceof Object) {
+            for (var i = 0; i < firstArg.length; i++) {
+              if (first[firstArg[i]]) {
                 options = first;
                 collectOptions = false;
                 break;
               }
             }
-          } else if (requiredArg && first[requiredArg]) {
+          } else if (firstArg && first[firstArg]) {
             options = first;
             collectOptions = false;
           }
Fix if there is only one argument and the function has no required arguments

Will now search through all the optional arguments.