fixed a typo in var assignment