Fix reload bug when form is submitted