fix some minor js issues