Corrected route-setting condition