Fixed strict warning about beforeSave() signature