bug fix for categories