rookie global var mistake