bug fix in quantification