Fix random NPE