Add additional safety to diagnostics