fixes for diag