fix some annoying js errors