stopping application on stop