Fixed an NPE