fix id mismatch bug in _view.php