fixed bug if no custom field exists