diff --git a/twitter_pull.module b/twitter_pull.module
index 923169f..b48cb8f 100644
--- a/twitter_pull.module
+++ b/twitter_pull.module
@@ -61,7 +61,7 @@ function twitter_pull_theme() {
 function twitter_pull_preprocess(&$variables, $hook) {
   switch($hook) {
     case 'twitter_pull_listing':
-    if (!empty($variables['tweets']) && is_array($variables['tweets'])) {
+    if (isset($variables['tweets']) && !empty($variables['tweets']) && is_array($variables['tweets'])) {
       foreach ($variables['tweets'] as $key => $tweet) {
         $tweet->time_ago = t('!time ago.', array('!time' => format_interval(time() - $tweet->timestamp)));
         $variables['tweets'][$key] = $tweet;
