Fixed variable name misspelling.
Fix JS code style.