Fix bugs in ProductsPage and CategoriesPage