Fix categories creation
Merge pull request #1781 from GPCsolutions/categoriesfix

Fix categories creation