Added stopping functionality.