fixing intermittent js test failures