Added support for custom fields