fix not working exit