Fixed a problem with optional fields.