Fix js to be consistent with b6235374b91ba7acf62c06c72de2f1291f46ac4c