reload page if necessary