fix endRefreshing