Fix control loop error