Fix some stupid NPEs.