Fix crash when searching against category.