fixing script to select correct global tag