fix error in validation and front end