fixed stopping the application