Fix wrong var assignment