Bugfixes + use API for category numbers