solve js charing problem