fixing a potential NPE