Some fixes and improovements for datastream uploads.