Fixed bug in uploading.