Fix dependency cycle issue