Fixed document uploading issue