fixed bug in quality assignment?