Hopefully fix bug in returned text selection.