fix auto refresh not working
improve isRefreshing detection