strange js errors fixed