fixed control_nr algorithm