Fixes to a pair of counting errors.