         result = result.substring(0, len-vFactoryName.length)
       ###
       if aBaseNameOnly # then remove Parent Name if any
-        aParentClass = aClass.super_ unless aParentClass
+        aParentClass = getParentClass(aClass) unless aParentClass
         names = getClassNameList aParentClass
         names.push Factory.name
         if names.length

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

    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 '/'
