Incorrectly redefining variables