Change unsaved changes exit.

I fixed the last pull request. It makes sense now.

Notice: I am new to coding. Thanks for your comment.