Fixing various validation issues.