modified truncate bytes func to always hit the end of the array