fix for refresh not ending