nandhp-volumed: Move global statement to top of function