fixed circular dependency ref