Fix circular dependencies