fixing a NPE