Fixed JS error by adjusting variable name

Name of a variable was changed in a declaration but not where it was used. Changed it there as well now.
Merge pull request #24 from Shepard/patch-1

Fixed JS error by adjusting variable name by @Shepard