Fix js language switch issue