fix diagnostics