fix escaping last char if odd offset