bug-fix: take care of surrogate on the right side of the middle