Fixed a small bug in javascript
Merge pull request #3 from jhuang314/master

Hey Devon!