corrected bug in quantize_prec()