correct errors to validate