Fixed static variables carrying over

Wow, well, that was definitely something I did while completely tired
out of my mind. Works like a charm now.