fixing an NPE