Fixed bug in diagnostic images