fix some more js weirdness