Circular dependency bug fixed