bug fix for validation