fix crash while setfields