Dirty NPE fix attempt