Fix stopping bug