simplify stop logic.