Fix some upsampling problems.