Added beforeSave userhook and adapted update method