fixes issues in getNestedCategories() where id of root_category is not 1