Fix input validation.