Displaying "No results found" on Search page

I am having a problem with this. Search results display as expected but if I get zero hits, I don’t get the ‘There are no results’ paragraph.

@texnixe snippet

<?php if($results) : ?>
  <h3>Search results:</h3>
  <ol class="searchresults">
    <?php foreach($results as $result): ?>
      <li>
        <a href="<?php echo $result->url() ?>">
         <?php echo $result->title()->html() ?>
        </a>
      </li>
    <?php endforeach ?>
  </ol>
<?php else : ?>
  <p>There are no results</p>
<?php endif ?>

I tried this example also but I get the same result.

I am using the standard search controller example snippets from here

Any ideas on how to get this to work?

Thanks