BugFix for "#959 StringIndexOutOfBoundsException with invalid Preview text "