Fix form_end function.