fixes to redirecting after file uploads