Prevent thread deleting while refreshing