fixes circular reference bug