Fix a UI crash.