Small js fixes
Merge pull request #21 from 0xabad1deaf/js

Small js fixes