fix auto refreshing issue