fixed bug when ideal was used
subcategories fixed