Added more validation.