Unterminated function fix (reported in #58 by @iceicetimmy)
Merge pull request #87 from om4james/jsfixes

Unterminated function fix