fix the double js init