fix some more js issues