Fix NPE in SaveAll code