Changed the stop to avoid a potential race condition