fixing validator bug