Don't close the terminal unless we are actually closing.