fixed problems in UG uploading and downloading