fixed small bug in do_begin_form