fix bug in custom field model