Fix a rare NPE.