fixed bug in stopping.py