fixes form and some redirects