fixes in quality.py file.