main js fix