diff --git a/imagecache_token.module b/imagecache_token.module
index 2444c01..d1439c4 100644
--- a/imagecache_token.module
+++ b/imagecache_token.module
@@ -101,7 +101,7 @@ function imagecache_token_tokens($type, $tokens, array $data = array(), array $o
           elseif ($file = file_load($field['fid'])) {
             $uri = $file->uri;
           }
-          $output[] = !empty($uri) ? image_style_url($token, $uri) : '';
+          $output[] = !empty($uri) ? image_style_url($type, $uri) : '';
         }
       }
       $replacements[$original] = implode(', ', $output);
