fixed the bug of unexpected stop