fix some validation problems