corrected bug for categories