fixed uploading bugs