Fixed bug where last RLE sequence was not recorded