               vCaller = vCaller.caller
             aName = Factory.getNameFromClass(aName) if aName
           return unless aName
-
-        #aName = aName.toLowerCase()
+        else
+          aName = Factory.formatName aName
         result = registeredObjects[aName]
         if result is undefined
           # Is it a alias?

    extendClass: extendClass = (aParentClass) ->
      extend aParentClass,
        register: _register = (aClass, aOptions)->
          result = inherits aClass, aParentClass
          if result
            extendClass(aClass) unless flatOnly
            vName = aOptions.name if aOptions
            vName = Factory.getNameFromClass(aClass) unless vName
            aClass::name = vName
            result = not registeredObjects.hasOwnProperty(vName)
            if result

      @::register= (aClass, aOptions)-> @constructor.register aClass, aOptions
      @::unregister= (aName)-> @constructor.unregister aName
      @::registered= (aName)-> Factory(aName)
      @::registeredClass= (aName)->
        aName = Factory.formatName aName
        @constructor[aName]

    inherits Factory, CustomFactory

