Revert the logic for downsample and applytransform.