Yet another upsampling bug fix