fix bug i accidentally introduced in the diagnostic function