Improved thread stopping.
Minor change.