Added terminate() handling to get quicker response when the user wants to terminate