fix form handling