Handle Clear's output more robustly.