Fix viewtables.php