fix error while creating category with duplicate name