modified syntax on the js and ccorrecting old issue.