Fixed a NPE on a clean set up.