updated js for switchlanguage bug