fixed subcategory view

needed a if(isset()) in it since it was giving out errors!