Bugfix in diagnosis tool
Merge branches 'master' and 'diagnosis'