fix javascripts for pages;