Fixed an error when invalid files were upload via the upload page.