Fixed validation bug