Fixing a multitude of reported NPEs.