fix when using custom fields