Fixed the NPE