Fixed refresh and pageload