fixed uploading bug