some minor changes to validator