the app closes after clicking ok