Fix test failures.
Merge pull request #239 from eric-wu/js

Fix test failures