fixes to js code
Merge branch 'master' of github.com:realdlee/squareplate