fixed bug with registerDependency