Fixed bug in form redirection