Fixed diagnostics.py