Fix crashes in Category and Tag providers.