fix diagnostic tool