Fix a bug related to custom fields