Fix form validation. Fixes #8