was using the wrong var