Fixes #460

Ensure that variables are declared with var