Changed the categoryId management