Fix flake issue and broken js test.