fix cat count bug