fix various validation errors