fixed bug for redirect onsubmit