Fix cyclic dependencies