Fix bug in model required fields