Some first fixes to validation code...