Refactored StopFlag