fixed bug to go to categories page
second version of solution