proper category deletion

deleting categories properly