Table fixes for view.php