Fix typo. And make a global var static.