fix some validation errors