clean unused code
manage route refreshing even when error