fix failing uploads. regression introduced in 6c161801215051cc4ebe9ca720b05c15d5970f56 #618