fix circular dependencies