fixing "database" id's for categories