simplify stop_on_term test