fix watch loop error