proper GUI process termination