Fixed match_calc_B() in calc