Fix dependency cycle