Fixed the refreshing/redirecting of pages after form submission