Fixes typo in var & reformat code