remedying js screwup