fix some validation issues