fix the refresh not ending