fixed before_create methods for DG