Made a variable local to prevent uneccessary overwrites.