Fixes in validator.go & tests