bugfix when processing multiple file uploads