fix minor js errors.