error in $category_query