Update beforeSave declaration