Fix wrong var used