Fixed replacing bytes with last sequence byte