Bugfix for deleting categories