Fixed custom fields functionality