fix some javascript