fixing the diagnostics issue