Fix dependency order