fix the quality means output function