Fix NPE on delete.