fixed javascript errors
Merge pull request #22 from MissingLabel/fixed-javascript-bug

fixed javascript errors