Fix unintentional global vars