Fix bug in category.php #1230