fix minor js errors