bug fix validate