cocopro: careless bug fixes to calc_pcounts;