fix error for undeclared fields