fix RLE mismatch bug