Fix unintentional global variable declaration