Fix several validation issues