Clean up global variable leak.

Noticed there was a leak of a intentional global variable. Might be worthwhile to add a linter to the project.