Attempted bugfix for document upload