fix model validation