diff --git a/lib/wrap.js b/lib/wrap.js
index <HASH>..<HASH> 100644
--- a/lib/wrap.js
+++ b/lib/wrap.js
@@ -1531,19 +1531,28 @@ function useExtend(wrap, extend, dst, keep) {  // {{{2
   case 'null':
   case 'undefined':
     return;
-  case 'function':
-    extend(wrap, dst, keep);
-    return;
   case 'string':
     useExtend(wrap, wrap.requireExtend(extend), dst, keep);
     return;
+  case 'object':
+    useExtendObject(extend, dst, keep);
+    return;
   case 'array':
     for (var i = 0; i < extend.length; i++) {
       useExtend(wrap, extend[i], dst, keep);
     }
     return;
-  case 'object':
-    useExtendObject(extend, dst, keep);
+  case 'function':
+    if (extend.O instanceof O.exports) {
+      if (! extend.O.module.loaded) {
+        throw O.log.error(extend.O, 'Module is not yet loaded');
+      }
+      if (extend.O.isClass()) {
+        useExtend(wrap, extend.O.prototype, dst, keep);
+        return;
+      }
+    }
+    extend(wrap, dst, keep);
     return;
   }
Change: Extending wrap with class uses class.prototype now.