Popular Post Bug

I have the following code to display my most popular posts in the sidebar: ` {popularposts} {if $pposts != ‘’}   <h2>Most Popular Posts</h2>     <ul>     {foreach from=$pposts key=key item=hits}       <li>{$hits.title truncate:25:”…”}</a>: {$key}</nobr></li>     {/foreach}     </ul> {/if} ` However, it doesn’t work: the links are all to the least recent of my recent posts the last post on the page. I’ll have to fix this. (Note: a fix is in the comments).