fixxes  to the javascript