Fix upsampling, at least mostly.