Patch for potential NPE.