Fix mix of tab / space whitespace and missing var declaration