fix order of operations for quality arg