Fixed a minor bug with required fields.