updated whitelist func to restore attrs after save