wrong var being passed