fixing some validation issues