It's important to keep in mind that Comment module might be disabled, in which case the $comments variable isn't going exist at all. I'd suggest changing this line to:

```
  <?php if ($page && isset($comments)): ?>
```

This will make it so that it doesn't throw a PHP notice when $comments doesn't exist.