bug fixing in validator