Fixed a bug when adding a new category

Signed-off-by: Malte Sussdorff <malte.sussdorff@cognovis.com>