fixed an NPE