Minor bug fix on the diagnose command.