bug fix.
Add validation.