fix some cyclic dependencies