Virtual route for a static tag

Finally it works, thanks a lot!
I used the wrong order, now I can use the virtual page or the normal tag filter with this code in the blog.php controller:

  // add the tag filter
  if($tag) {
    $articles = $articles->filterBy('tags', $tag, ',');
  }
  if($tag = param('tag')) {
    $articles = $articles->filterBy('tags', $tag, ',');
  }

Initially I just pasted the mentioned code below the existing one.