fixed a validation bug