added fixed javaScript