diff --git a/PlayBot/sites.pm b/PlayBot/sites.pm
index db338a7bd1545a6458f7cb96a9f90c7abeda122b..df355bc39175a3be7f72be3cfa8226ae93dfe264 100644
--- a/PlayBot/sites.pm
+++ b/PlayBot/sites.pm
@@ -25,19 +25,20 @@ sub parse {
     my $id;
     my $dbh = PlayBot::utils::db::main_session();
 
+    my $matching_url;
+    my @matching_tags;
+
     # parsing
     foreach my $site (__PACKAGE__->sites)
     {
         if (my @args = ($msg =~ $site->regex))
         {
 		    eval { %content = $site->get(@args) };
+            $matching_url = $&;
             last;
         }
     }
 
-    my $matching_url = $&;
-    my @matching_tags;
-
     # something goes wrong ?
     if ($@) {
         $log->warning ($@);