fix 'undefined variable fields'