Allows empty category IDs and fixes search/category ID bug