Fix bug in setStyleSpans().