Fix view error for null category_id