Fixed validation check