Fix logic error
Clean up form redirection behaviour