Restore submitted values on failed registration.

See #241