Revert "Revert "Revert "Change global variable to local for AGN Safe Zone"""

This reverts commit 440ccece8b16fe1eaf86189aa6f80b1bce642d2c.