Small changes for document uploading