Fixed page not loading on refresh