fix count category bug