Bugfixes when there are no categories defined