Added validation.
Fixed up.