Small fix to the JS sample