Fixed a couple of bugs in the form helper.