fix save errors in custom fields