Fixes improper var names, causing syntax errors