Fix diagnostics print bug