quick bugfix
db fixes and trigger on categorie delete