Fixed a bug where multiple files would fail uploading