fixed diagnostics circular reference