fix tests
fix circular dependencies