Tweak code for validator