Fix primary custom fields support