category count wrong - patch