Bugfix for device upload and download.