diff --git a/mx.fastr/mx_fastr_pkgs.py b/mx.fastr/mx_fastr_pkgs.py
index f165d094756c9f532823c7a758576df356bb7724..064697ae4d4dcb06abad83fe09be12ee26c2369a 100644
--- a/mx.fastr/mx_fastr_pkgs.py
+++ b/mx.fastr/mx_fastr_pkgs.py
@@ -204,14 +204,13 @@ def pkgtest(args):
     fastr_libinstall, fastr_install_tmp = _create_libinstall('fastr', test_installed)
     gnur_libinstall, gnur_install_tmp = _create_libinstall('gnur', test_installed)
 
+    global verbose
     if "--quiet" in args:
         global quiet
         quiet = True
     if "-v" in args or "--verbose" in args:
-        global verbose
         verbose = 1
     elif "-V" in args:
-        global verbose
         verbose = 2
 
     install_args = list(args)