V2.4.5 Added checks in OnSave to avoid NRE