diff -ru mostpopular.orig/modules/mostpopular_drupal/mostpopular_drupal.module mostpopular.fixed/modules/mostpopular_drupal/mostpopular_drupal.module
--- mostpopular.orig/modules/mostpopular_drupal/mostpopular_drupal.module	2012-02-14 17:46:13.000000000 +0100
+++ mostpopular.fixed/modules/mostpopular_drupal/mostpopular_drupal.module	2012-04-20 11:40:28.097982945 +0200
@@ -63,14 +63,14 @@
 
   // If we are looking at a single day, get the day stats
   if ($span <= 60 * 60 * 24) {
-    $query->field('c', 'daycount', 'count');
+    $query->addField('c', 'daycount', 'count');
     $query
       ->condition('c.daycount', 0, '>')
       ->orderBy('c.daycount', 'DESC');
   }
   // Otherwise, get the overall stats for nodes created since the last run.
   else {
-    $query->field('c', 'totalcount', 'count');
+    $query->addField('c', 'totalcount', 'count');
     $query
       ->condition('n.created', $ts, '>=')
       ->condition('c.totalcount', 0, '>')
@@ -87,11 +87,11 @@
   $out = array();
   $rows = $query->execute();
   foreach ($rows as $row) {
-    $out[] = array(
-      'entity_type' => 'node',
-      'entity_id' => $row->nid,
-      'count' => $row->count,
-    );
+    $n = new stdClass();
+    $n->entity_type = 'node';
+    $n->entity_id = $row->nid;
+    $n->count = $row->count;
+    $out[] = $n;
   }
   return $out;
 }
@@ -142,4 +142,4 @@
  */
 function mostpopular_drupal_next_run($service, $span, $last_run) {
   return time();
