fixed type validator bug