fixing bug in controls_if