Fixed js

All tests pass.