Fixed error message about undefined fields