JS structure fix