fix main js problem