Fixed the problem of stopping the application