Fix bug uploading code