Some JS corrections