Fix dependency hierachy