           if result
             aName = vClass::name
             #TODO:should I unregister all children?
-            while vClass and vClass.super_ and vClass.super_ isnt Factory
-              vClass = vClass.super_
+            while vClass and (vParentClass = getParentClass(vClass)) and vParentClass isnt Factory
+              vClass = getParentClass vClass
               delete vClass[aName]
             delete registeredObjects[aName]
             delete Factory[aName]

inherits              = require('inherits-ex/lib/inherits')
isInheritedFrom       = require('inherits-ex/lib/isInheritedFrom')
createObject          = require('inherits-ex/lib/createObject')
extend                = require('./extend')
isFunction            = (v)-> 'function' is typeof v
isString              = (v)-> 'string' is typeof v
isObject              = (v)-> v? and 'object' is typeof v
getObjectKeys         = Object.keys

exports = module.exports = (Factory, aOptions)->
  if isObject aOptions

    getClassList: (ctor)->
      result = while ctor and ctor isnt Factory
        item = ctor
        ctor = getParentClass ctor
        item
    getClassNameList: getClassNameList = (ctor)->
      result = while ctor and ctor isnt Factory
        item = ctor::name
        ctor = getParentClass ctor
        item
    path: (aClass, aRootName)->
      '/' + @pathArray(aClass, aRootName).join '/'
