Fix categories and nodes relationship