fixes to uploading data