Added some error handling for the category page