bugfix for upload