Fixed a few JS bugs
Merge remote-tracking branch 'origin/master'