fix to problems with uploading files