Fixed null pointer exception when extracting a category without
subcategories