Fix continuous endRefreshing problem