Main page and js reload fix