Added support for undefined fields. Can't believe this was missing.