Fixed broken rewrite_each_url method