Security bugfix for weird non-resetting variable bug.