Fix bug when uploading using google chrome