fix error in validation