fixing bug of too many categories