fixing validation issues