fixed js init issue