Fix js errors