Fix erorr in parsing surrogate pairs