fix a validation bug