Fixed issue with model.validate().