corrigation of javascript