Fixed indexing upon file upload