Fix UI crash.