fixed diags bug