Updated beforeSave signature for 2.4 compatability