Bug #4028 Fix model beforeSave bug