repaired improper use of variable