fix bug in UploadKeyActivity, minor work on uri handling